package com.bjb.vr.operation.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.bjb.vr.common.ao.ResContentAo;
import com.bjb.vr.common.ao.ResDictionaryAo;
import com.bjb.vr.common.dto.ResContent;
import com.bjb.vr.common.result.BaseResult;
import com.bjb.vr.common.result.CommonResult;
import com.bjb.vr.common.service.ResContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0.0
 * @description:课程内容管理
 * @author: caihaibo
 * @createDate: 2022/8/5
 */
@RestController
@RequestMapping("/api/operation/v1")
public class ContentController {


	@Autowired
	ResContentService resContentService;

	/**
	 * 获取课程内容分页记录(资源授权管理-选择课程资源)
	 * @param resContentAo
	 * @return
	 */
	@PostMapping("/queryResContentPage")
	public BaseResult<IPage<ResContent>> queryResContentPage(@RequestBody ResContentAo resContentAo) {
		IPage<ResContent> voIPage = resContentService.queryResContentPage(resContentAo);
		return CommonResult.Ok().setResult(voIPage);
	}

}
